This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
RE: Change the parent document of a response document ~Delores Zenniverlen 28.Jan.04 12:51 AM a Web browser Applications Development 6.0.3Windows 2000
This is code I run in an agent (could be querysave) which updates a Parent doc when Response is saved.
You can use the document UNID as the key
***********
' PURPOSE: Updates Staff version of Student Docs (Parent Doc) when a Student changes their profile (Response doc)
' get the current document key (NotesName)
' go out to the view and walk the documents
' change the status to newMode
Dim doc As NotesDocument
Dim db As NotesDatabase
Dim view As NotesView
Dim docBackend As NotesDocument
Dim uidoc As notesuidocument
Dim thisKey As String
Dim thisNewKey As String'
Dim ws As New NotesUIWorkspace
Set uidoc = ws.currentdocument
Set doc = uidoc.document
Dim session As New NotesSession
Dim entry As NotesViewEntry
Dim vc As NotesViewEntryCollection
Set db = session.CurrentDatabase
thisKey = doc.NotesName(0)
Set view = db.GetView( "vLuSS" )
Set vc = view.GetAllEntriesByKey( thisKey )
Set entry = vc.GetFirstEntry()
If entry Is Nothing Then
Exit Sub
Else
Do While True
Set docBackend = entry.Document